package com.wtwd.campus.service;

import com.wtwd.campus.common.RespCodeEntity;
import com.wtwd.campus.entity.*;
import com.wtwd.campus.service.impl.RMFeignClientServiceImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author ldaoliang
 * @Date create in 14:01 2021/6/10
 * @Description 服务调用
 */
@FeignClient(value = "RocketMQService", fallback = RMFeignClientServiceImpl.class)
public interface IRMFeignClientService {

    // 主动查询设备定位
    @PostMapping("/command/queryDeviceLocation/{imei}/{commandNumber}")
    RespCodeEntity queryDeviceLocation(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 查询设备参数
    @PostMapping("/command/queryDeviceParam/{imei}/{commandNumber}")
    RespCodeEntity queryDeviceParam(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 查询设备ICCID和卡号
    @PostMapping("/command/queryDeviceIccidAndSimCardNo/{imei}/{commandNumber}")
    RespCodeEntity queryDeviceIccidAndSimCardNo(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 查询设备Imeid号
    @PostMapping("/command/queryDeviceImeid/{imei}/{commandNumber}")
    RespCodeEntity queryDeviceImeid(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 设置临时服务器地址
    @PostMapping("/command/setTempIpAndPort")
    RespCodeEntity setTempIpAndPort(@RequestBody MqSetIpAndPort mqSetIpAndPort);

    // 设置临时服务器地址
    @PostMapping("/command/setDefaultIpAndPort")
    RespCodeEntity setDefaultIpAndPort(@RequestBody MqSetIpAndPort mqSetIpAndPort);

    // 设置工作模式
    @PostMapping("/command/setWorkMode")
    RespCodeEntity setWorkMode(@RequestBody MqSetWorkMode mqSetWorkMode);

    // 设置上报时间间隔
    @PostMapping("/command/setUpLoadInterval/{imei}/{commandNumber}/{interval}")
    RespCodeEntity setUpLoadInterval(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("interval") Integer interval);

    // 设置监听号码
    @PostMapping("/command/setMonitorPHone/{imei}/{commandNumber}/{phone}")
    RespCodeEntity setMonitorPhone(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("phone") String phone);

    // 设置闲时自动切换模式
    @PostMapping("/command/setSleepTimeAutoChangeMode")
    RespCodeEntity setSleepTimeAutoChangeMode(@RequestBody MqSleepTimeAutoChange mqSleepTimeAutoChange);

    // 设置课堂模式（免打扰协议）
    @PostMapping("/command/setClassMode")
    RespCodeEntity setClassMode(@RequestBody DeviceClassMode deviceClassMode);

    // 设置课堂模式开关（免打扰协议）
    @PostMapping("/command/setClassModeSwitch/{imei}/{commandNumber}/{flag}")
    RespCodeEntity setClassModeSwitch(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("flag") Integer flag);

    // 设置PDOP门限
    @PostMapping("/command/setPDOP/{imei}/{commandNumber}/{thresholdParam}")
    RespCodeEntity setPDOP(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("thresholdParam") Integer thresholdParam);

    // 设置SOS开关
    @PostMapping("/command/setSOSSwitch/{imei}/{commandNumber}/{onOff}")
    RespCodeEntity setSOSSwitch(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("onOff") Integer onOff);

    // 恢复出厂设置
    @PostMapping("/command/reSetDevice/{imei}/{commandNumber}")
    RespCodeEntity reSetDevice(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 重启设备
    @PostMapping("/command/reStartDevice/{imei}/{commandNumber}")
    RespCodeEntity reStartDevice(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 设备关机
    @PostMapping("/command/shutDownDevice/{imei}/{commandNumber}")
    RespCodeEntity shutDownDevice(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 调节音量
    @PostMapping("/command/adjustVolume/{imei}/{commandNumber}/{speakLevel}")
    RespCodeEntity adjustVolume(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("speakLevel") Integer speakLevel);

    // 切换设备id
    @PostMapping("/command/exchangeDeviceId/{imei}/{commandNumber}/{idParam}")
    RespCodeEntity exchangeDeviceId(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("idParam") Integer idParam);

    // 设置白名单
    @PostMapping("/command/setWhiteCall")
    RespCodeEntity setWhiteCall(@RequestBody DeviceWhiteCall deviceWhiteCall);

    // 一次性设置所有白名单
    @PostMapping("/command/setAllWhiteCall")
    RespCodeEntity setAllWhiteCall(@RequestBody MqSetAllWhiteCall mqSetAllWhiteCall);

    // 设置白名单开关
    @PostMapping("/command/setWhiteCallSwitch/{imei}/{commandNumber}/{onOff}")
    RespCodeEntity setWhiteCallSwitch(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("onOff") Integer onOff);

    // 获取设备步数
    @PostMapping("/command/getStepNum/{imei}/{commandNumber}")
    RespCodeEntity getStepNum(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 修改设备m1卡号
    @PostMapping("/command/updateM1Card/{imei}/{commandNumber}/{m1Card}")
    RespCodeEntity updateM1Card(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("m1Card") String m1Card);

    // 清除Sim卡
    @PostMapping("/command/cleanSim/{imei}/{commandNumber}")
    RespCodeEntity cleanSim(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复kA
    @PostMapping("/command/replyKA/{imei}/{commandNumber}")
    RespCodeEntity replyKA(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复Weather
    @PostMapping("/command/replyWeather/{imei}/{commandNumber}")
    RespCodeEntity replyWeather(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复SOS
    @PostMapping("/command/replySOS/{imei}/{commandNumber}")
    RespCodeEntity replySOS(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复低电
    @PostMapping("/command/replyBLOW/{imei}/{commandNumber}")
    RespCodeEntity replyBLOW(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复通话记录
    @PostMapping("/command/replyCallNote/{imei}/{commandNumber}")
    RespCodeEntity replyCallNote(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复监听记录
    @PostMapping("/command/replyMonitorNote/{imei}/{commandNumber}")
    RespCodeEntity replyMonitorNote(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 回复步数
    @PostMapping("/command/replyStep/{imei}/{commandNumber}")
    RespCodeEntity replyStep(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber);

    // 一次性设置所有白名单
    @PostMapping("/command/setAllSosCall")
    RespCodeEntity setAllSosCallList(MqSetAllSosCall mqSetAllSosCall);

    // 设置静默关机
    @PostMapping("/command/setSilentShutDown/{imei}/{commandNumber}/{flag}")
    RespCodeEntity setSilentShutDown(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("flag") Integer flag);

    // 下发设备绑定状态
    @PostMapping("/command/setBindingStatus")
    RespCodeEntity setBindingStatus(@RequestBody DeviceBindingStatus data);

    // 设置设备闹钟
    @PostMapping("/command/setAlarm")
    RespCodeEntity setAlarm(@RequestBody DeviceAlarm data);

    // 删除设备闹钟
    @PostMapping("/command/deleteAlarm/{imei}/{commandNumber}/{sequence}")
    RespCodeEntity deleteAlarm(@PathVariable("imei") String imei, @PathVariable("commandNumber") String commandNumber, @PathVariable("sequence") String sequence);

    // 下发文本
    @PostMapping("/command/sendText")
    RespCodeEntity sendText(@RequestBody MqTextData data);

    //关闭通道
    @PostMapping("/command/closeChannel/{imei}")
    RespCodeEntity closeChannel(@PathVariable("imei") String imei);

    //考勤机时间校准指令下发
    @PostMapping("/command/sendTimeAdjusting/{proNo}")
    RespCodeEntity sendTimeAdjusting(@PathVariable("proNo") String proNo);

    //考勤机打卡数据上报回复
    @PostMapping("/command/sendDataReply/{serialNo}/{productNo}")
    RespCodeEntity sendDataReply(@PathVariable("serialNo") String serialNo, @PathVariable("productNo") String productNo);

    // 威科姆免打扰
    @PostMapping("/command/vcomNotDisturb")
    RespCodeEntity vcomNotDisturb(@RequestBody MqVcomNotDisturb mqVcomNotDisturb);

    // 威科姆通知信息
    @PostMapping("/command/vcomNoticeMessage")
    RespCodeEntity vcomNoticeMessage(@RequestBody MqVcomMessage mqVcomMessage);

    // 威科姆短消息
    @PostMapping("/command/vcomShortMessage")
    RespCodeEntity vcomShortMessage(@RequestBody MqVcomMessage mqVcomMessage);

    //远程调用netty删除redis指令
    @PostMapping("/command/deleteCommandInRedis")
    RespCodeEntity deleteCommandInRedis(@RequestBody MqDeleteRedisCommand mqDeleteRedisCommand);

    //获取设备鉴权密匙
    @PostMapping("/command/replyGetLtAuthKey")
    RespCodeEntity replyGetLtAuthKey(@RequestBody MqGeneralReply mqGeneralReply);

    @PostMapping("/command/replyGetPhone")
    RespCodeEntity replyGetPhone(@RequestBody MqPhoneDatas phoneDatas);

    @PostMapping("/command/replyUploadApp")
    RespCodeEntity replyUploadApp(@RequestBody MqGeneralReply mqGeneralReply);

    @PostMapping("/command/replyUploadAppFile")
    RespCodeEntity replyUploadAppFile(@RequestBody MqGeneralReply mqGeneralReply);

    @PostMapping("/command/appInstallationSwitch")
    RespCodeEntity appInstallationSwitch(@RequestBody MqAppInstallationSwitch mqAppInstallationSwitch);

    @PostMapping("/command/appDisable")
    RespCodeEntity appDisable(@RequestBody MqAppDisable mqAppDisable);

    @PostMapping("/command/setLockNet")
    RespCodeEntity setLockNet(@RequestBody MqLockNet mqLockNet);

    @PostMapping("/command/setLockCard")
    RespCodeEntity setLockCard(@RequestBody MqLockCard mqLockCard);

    @PostMapping("/command/setLockDevice")
    RespCodeEntity setLockDevice(@RequestBody MqLockDevice mqLockDevice);

    @PostMapping("/command/getLockNet")
    RespCodeEntity getLockNet(@RequestBody MqGetLockNet mqGetLockNet);

    @PostMapping("/command/getLockCard")
    RespCodeEntity getLockCard(@RequestBody MqGetLockCard mqGetLockCard);

    @PostMapping("/command/getLockDevice")
    RespCodeEntity getLockDevice(@RequestBody MqGetLockDevice mqGetLockDevice);
}
